Personal computers typically include a clock/calendar that tracks the time of day, day, month, and year. Such a clock/calendar has various uses such as time stamping files and inserting dates into documents, such as letters and e-mails both sent and received. The clock/calendar must be programmable for setting or changing the date or time of day. A clock/calendar is typically implemented in specific hardware with a dedicated crystal oscillator to insure accuracy and a battery backup power supply to insure preservation of timekeeping data during an interruption of the primary power supply. This is especially important with personal computers which are frequently powered down.
Crystals generally show frequency variation with temperature resulting into several hundred ppm shift in their nominal frequency. Most applications, in particular, a Real Time Clock (RTC), requires accuracy of the input clock to be within +/−5 ppm over a temperature range of −40 to 85° C. in order to provide accurate time information to the user.
An RTC with a 32.768 kHz quartz tuning-fork crystal oscillator is currently the standard timekeeping reference for most electronic applications. The RTC maintains the time and date by counting seconds, which requires an oscillator divider chain to derive a 1 Hz clock signal provided by the 32.768 kHz crystal oscillator. The current time and date information is stored in a set of registers, which is generally accessed through a communication interface.
Tuning fork type crystal oscillators are known to have both a frequency offset at room temperature and frequency variation over temperature, typically resulting into several hundred ppm frequency shift from their nominal frequency of 32.768 kHz. These frequency offsets can be broken into two portions, one being the initial frequency inaccuracy, with the other being the frequency fluctuation over temperature. The typical frequency stability of a crystal can be described by equation (1) below:Δf=Δfi+α(T−T25)2  (1)Where Δf is in the total frequency variation in ppm; Δfi is the initial frequency tolerance at 25° C., which usually within the range of ±32 ppm; α is the parabolic curvature constant of the crystal, for the commonly used quartz watch crystal, α has a typical value of 0.034 ppm/C2 for quartz; T is temperature in Celsius and T25 is 25° C. This parabolic frequency versus temperature characteristic is depicted in FIG. 1.
Δfi is the constant frequency offset due to the manufacturing quality issues and aging of the crystal. The value of the second term in equation 1, α(T−T25)2, is determined by a which is a characteristic of the particular crystalline material, and the operating temperature. Both terms combined could contribute to a frequency variation up to about 200 ppm. For an RTC, 100 ppm in the frequency variation implies that there is about 120 seconds (about 2 minutes) of error at the end of a month's time.
It is well known to use load capacitors to adjust the parallel resonance frequency, f0, of crystal oscillators. This frequency, f0, has an inverse square root relationship to load capacitor (CL) changes. For on-chip load capacitor designs, some known designs use switched capacitor arrays controlled digitally by input code vectors. Such capacitor arrays are known as capacitor digital-to-analog converters (referred to as capacitor DACs, capacitive DACs or CDACs). A conventional capacitor DAC comprises of an array of N capacitors hooked in parallel with binary weighted values plus generally one “dummy LSB” capacitor. During the acquisition phase, the array's common terminal (the terminal at which all the capacitors share a connection) is connected to ground and all free terminals are connected to the input signal (Analog In or VIN). After acquisition, the common terminal is disconnected from ground and the free terminals are disconnected from VIN, effectively trapping a charge proportional to the input voltage on the capacitor array. Due to the binary weighting and conventional digital code used, in response to the applied digital input codes, such DACs provide a linear analog output (capacitance).
Some RTCs provide a digital calibration register that can be used to periodically adjust the time of day in discrete amounts. This method does not attempt to alter the crystal behavior, but instead, periodically adjusts the time according to the expected frequency deviation at a specified temperature. The effect is to move the 32.768 kHz parabolic curve up or down in an attempt to approach 0.0 ppm accuracy at a desired temperature. This is accomplished by adding or subtracting clock cycles from the oscillator divider chain. The number of clock pulses removed (subtracted for negative calibration) or inserted (added for positive calibration) is set by the value in the calibration register. By adding clock pulses, time is sped up (the crystal curve moves up). In contrast, by subtracting clock pulses, time is slowed down (the crystal curve moves down).
Another method dynamically changes the load capacitance to “trim” the crystal frequency. One known RTC circuit of this type includes a 6-bit capacitor DAC that provides a delta of 0.5 pF for each code which is used to trim the frequency. In such an arrangement, due to the well known nonlinear frequency to CL relationship, changing CL linearly results in a nonlinear change in frequency. For precision applications requiring better than ±5 ppm precision over a normal operating temperature range, such a non-linear frequency trim arrangement generally cannot meet the requirement.
A linear frequency shift per input code would be desirable as it would provide improved precision. However, due to the nonlinear frequency to CL relationship, the input code vectors would need to be nonlinear and more specifically parabolic to provide a linear frequency shift. Using known methods, this would require nonlinear digital signal processing which can be complex, and also generally requires a large chip area and significant power consumption. Thus, what is needed is a compact, low power RTC circuit which does not require factory calibration and automatically provides a minimal frequency variation over the full RTC operating temperature range, such as within ±5 ppm from −40 to 85° C.